//
//  HWItemHeaderView.m
//  HappyWeekend
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 com.mjykj.www. All rights reserved.
//
#define kRow 10
#import "HWItemHeaderView.h"

@implementation HWItemHeaderView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 376 * kScreenWidth / 481)];
        _scrollView.bounces = YES;
        _scrollView.alwaysBounceVertical = NO;
        _scrollView.showsHorizontalScrollIndicator = NO;
        _scrollView.showsVerticalScrollIndicator = NO;
        _scrollView.pagingEnabled = YES;
        [self addSubview:_scrollView];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRow, _scrollView.bottom + kRow, kScreenWidth - 2 * kRow, 50)];
        _titleLabel.numberOfLines = 0;
        [self addSubview:_titleLabel];
        
        _priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRow, _titleLabel.bottom + kRow, 100, 20)];
        _priceLabel.textColor = [UIColor colorWithRed:58.0f / 255.0f green:201.0f / 255.0f blue:187.0f / 255.0f alpha:1];
        [self addSubview:_priceLabel];
        
        _contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRow, _priceLabel.bottom, kScreenWidth - 2 * kRow, 200)];
        _contentLabel.font = [UIFont systemFontOfSize:14];
        _contentLabel.textColor = [UIColor grayColor];
        _contentLabel.numberOfLines = 0;
        [self addSubview:_contentLabel];
    }
    return self;
}

@end
